package hhm.activeMQ.idontknow;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;

public class ReceiverHandleImpl implements MessageListener {

	@Override
	public void onMessage(Message message) {
		if (message instanceof ObjectMessage) {
			ObjectMessage objectMessage = (ObjectMessage) message;

			try {
				Info info = (Info) objectMessage.getObject();

				System.out.println(info.toString());
			} catch (JMSException e) {
				e.printStackTrace();
			}
		}

	}

}
